package toOffer;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Stack;

/**
 * @author YuanAo
 * @date 2025/2/24 13:59
 * @description 简化路径
 */
public class NO71 {

    public static void main(String[] args) {
        String path1 = "/home/user/Documents/../Pictures";
        String path2 = "/.../a/../b/c/../d/./";
        String path3 = "/home//foo/";
        String path4 = "/a/./b/../../c/";

//        System.out.println("path1: " + simplifyPath(path1));
//        System.out.println("path2: " + simplifyPath(path2));
//        System.out.println("path3: " + simplifyPath(path3));
        System.out.println("path4: " + simplifyPath(path4));
    }

    public static String simplifyPath(String path) {
        String[] newPath = path.split("/");
//        Arrays.stream(newPath).forEach(
//                o -> o.
//        );

        return null;
    }
}
